<template>
  <div class='app-container'>
     <index-yl v-if='!imageShow'></index-yl>
     <img v-if='imageShow' style="width:100%;heigth:100%" :src="dashboard" alt/>
  </div>
</template>

<script>
import IndexChart from './IndexChart'
import IndexTask from './IndexTask'
import IndexBdc from './IndexBdc'
import IndexYl from './IndexYl'
import dashboard from '@/assets/background.jpg'
import { SYS_BUTTON_AUTH } from "@/store/mutation-types"

export default {
  name: 'dashboard',
  components: {
    IndexChart,
    IndexTask,
    IndexBdc,
    IndexYl
  },
  data() {
    return {
      dashboard:'',
      imageShow:true,
      indexStyle: 1
    }
  },
  created() {
    this.dashboard = this.$store.state.app.pageConfig.indexPageVo.backgroundUrl
    let buttonData =JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH))
    let index = buttonData.findIndex(item=>item.perm=='index:showTrue')
    if(index != -1){
      this.imageShow=false
    }else {
      this.imageShow=true
    }

  },
}

</script>

<style scoped>
/*.app-container {*/
/*  width: 100%;*/
/*  height: calc(90vh);*/
/*  background: #fff;*/
/*  display: flex;*/
/*  align-items: center;*/
/*}*/

/*.welcome {*/
/*  width: 100%;*/
/*text-align: center;*/
/*  background-image: -webkit-linear-gradient(left,blue,#66ffff 10%,#cc00ff 20%,#CC00CC 30%, #CCCCFF 40%, #00FFFF 50%,#CCCCFF 60%,#CC00CC 70%,#CC00FF 80%,#66FFFF 90%,blue 100%);*/
/*  -webkit-text-fill-color: transparent;*/
/*  -webkit-background-clip: text;*/
/*  -webkit-background-size: 200% 100%;*/
/*  -webkit-animation: masked-animation 4s linear infinite;*/
/*  font-size: 36px;*/
/*  letter-spacing: 0.1em;*/

/*}*/
/*@keyframes masked-animation {*/
/*  0% {*/
/*    background-position: 0  0;*/
/*  }*/
/*  100% {*/
/*    background-position: -100%  0;*/
/*  }*/
/*}*/

</style>
